import React, { Component } from 'react'
import { Space, Button, ColorPicker, Divider, Typography, QRCode, ConfigProvider } from 'antd'

const { Title, Paragraph } = Typography;

export default class AntdDemo extends Component {
  render() {
    return (
      <ConfigProvider
        theme={{
          token: {
            colorPrimary: 'orange',
          },
        }}
      >
        <Typography>
          <Title>按钮</Title>
          <Paragraph>
            <Space>
              <Button type="primary">按钮1</Button>
              <Button type="default">按钮2</Button>
              <Button type="link">按钮3</Button>
            </Space>
          </Paragraph>
        </Typography>
        <Divider />
        <Typography>
          <Title>颜色选择器</Title>
          <Paragraph>
            <ColorPicker defaultValue="#1677ff" />
          </Paragraph>
        </Typography>
        <Typography>
          <Title>二维码</Title>
          <Paragraph>
            <QRCode value="https://ant.design/" />
          </Paragraph>
        </Typography>
      </ConfigProvider>
    )
  }
}
